'use strict';
var fayeClient = require('./faye-client');

module.exports = function(app, router) {
  var client = fayeClient(app);
  router.get('/inventory/all', function*(req, res, next) {
    // console.log("/inventory/all");
    var order = req.body;
    let reply = yield client.request('/stores/' + req.params.storeId +
      '/order/placement', {
        order: order
      });
    console.log('reply:', reply);
    res.json({});
  });
}
